package pref.junx.flybird.activity.UserInfo;

import android.view.View;
import android.widget.TextView;

import pref.junx.flybird.R;
import pref.junx.flybird.activity.UpdataUserInfo.UpdataUserInfoActvity;
import pref.junx.flybird.base.BaseActicvitylhy;
import pref.junx.flybird.tools.JumpUtil;


/**
 * Created by 半生瓜 on 2017/8/7.
 */

public class UserInfoActvity extends BaseActicvitylhy<UserInfoPresenter, UserInfoModel> implements UserInfoConteact.View {

   TextView nub,nick,phone,email,sex;
   TextView back,updata;
    @Override
    public int getLayoutId() {
        return R.layout.watch_user_layout;
    }

    @Override
    public void initview() {
      back=(TextView) findViewById(R.id.finish_ui)    ;
        updata=(TextView ) findViewById(R.id.up_ui) ;
     nub=(TextView)findViewById(R.id.watch_ui_number);
        nick=(TextView)findViewById(R.id.watch_ui_nickname);
                phone=(TextView)findViewById(R.id.watch_ui_phone);
                        email=(TextView)findViewById(R.id.watch_ui_email);
                                sex=(TextView)findViewById(R.id.watch_ui_sex);
        back.setOnClickListener(this);
        updata.setOnClickListener(this);
    }

    @Override
    public void processClick(View view) {
switch (view.getId()){
    case R.id.finish_ui:
        finish();break;
    case R.id.up_ui:
        JumpUtil.to(c, UpdataUserInfoActvity.class);

}

    }


    @Override
    public void init() {
        nick.setText(spTools.getString("user_nick"));
        nub.setText(spTools.getString("user_name"));
        email.setText(spTools.getString("email"));
        sex.setText(spTools.getString("sex"));
       phone.setText(spTools.getString("phone"));


    }


    @Override
    public void success() {

    }

    @Override
    public void result(String a) {

    }
}


